<table style="border-collapse: collapse; width: 750px;" border="0" cellpadding="0" cellspacing="0">
		<thead>
			<tr><th style="color: black; font-family: monospace; font-size: 1.2em; font-weight: bold; padding: 4px 0;" colspan="2"><?php if($this->toAdmin==true){echo "{%You received a new order%}";}else{echo "{%Thank you for your order%}!";}?></th></tr>
		</thead>
		<tbody>
			<?php if($this->toAdmin==false) { ?>
			<tr><td style="background: #848484; color: whitesmoke; font-family: monospace; font-size: 1.1em; font-weight: bold;	padding: 2px 15px;" colspan="2">{%Business Information%}</td></tr>
			<tr>
				<td colspan="2">
					<table id="businessInfo" border="0" cellpadding="0" cellspacing="0">
						<tr>
							<td rowspan="6" style="padding: 2px 10px; font-family: monospace; font-size: 1.2em; font-weight: normal;"><img src="cid:companyLogo" alt="" title="" /></td>
						</tr>
						<tr>
							<td style="padding: 2px 10px; font-family: monospace; font-size: 1.2em; font-weight: normal;">{%Company%}: </td>
							<td colspan="3" style="padding: 2px 10px; font-family: monospace; font-size: 1.2em; font-weight: normal;"><?php echo $this->businessName; ?></td>
						</tr>
						<tr>
							<td style="padding: 2px 10px; font-family: monospace; font-size: 1.2em; font-weight: normal;">{%Phone%}: </td>
							<td style="padding: 2px 10px; font-family: monospace; font-size: 1.2em; font-weight: normal;"><?php echo $this->businessPhone; ?></td>
							<td style="padding: 2px 10px; font-family: monospace; font-size: 1.2em; font-weight: normal;">{%Email%}: </td>
							<td style="padding: 2px 10px; font-family: monospace; font-size: 1.2em; font-weight: normal;"><?php echo $this->businessEmail; ?></td>
						</tr>
						<tr>
							<td style="padding: 2px 10px; font-family: monospace; font-size: 1.2em; font-weight: normal;">{%Address1%}:</td>
							<td style="padding: 2px 10px; font-family: monospace; font-size: 1.2em; font-weight: normal;"><?php echo $this->businessAddr1; ?></td>
							<td style="padding: 2px 10px; font-family: monospace; font-size: 1.2em; font-weight: normal;">{%Address2%}:</td>
							<td style="padding: 2px 10px; font-family: monospace; font-size: 1.2em; font-weight: normal;"><?php echo $this->businessAddr2; ?></td>
						</tr>
						<tr>
							<td style="padding: 2px 10px; font-family: monospace; font-size: 1.2em; font-weight: normal;">{%City%}: </td>
							<td style="padding: 2px 10px; font-family: monospace; font-size: 1.2em; font-weight: normal;"><?php echo $this->businessCity; ?></td>
							<td style="padding: 2px 10px; font-family: monospace; font-size: 1.2em; font-weight: normal;">{%State%}: </td>
							<td style="padding: 2px 10px; font-family: monospace; font-size: 1.2em; font-weight: normal;"><?php echo $this->businessState; ?></td>
						</tr>
						<tr>
							<td style="padding: 2px 10px; font-family: monospace; font-size: 1.2em; font-weight: normal;">{%Zip%}: </td>
							<td style="padding: 2px 10px; font-family: monospace; font-size: 1.2em; font-weight: normal;"><?php echo $this->businessZip; ?></td>
							<td style="padding: 2px 10px; font-family: monospace; font-size: 1.2em; font-weight: normal;">{%Country%}:</td>
							<td style="padding: 2px 10px; font-family: monospace; font-size: 1.2em; font-weight: normal;"><?php echo $this->businessCountry; ?></td>
						</tr>
					</table>
				</td>
			</tr>
			<?php } ?>
			<tr><td style="background: #848484; color: whitesmoke; font-family: monospace; font-size: 1.1em; font-weight: bold;	padding: 2px 15px;" colspan="2">{%Order Information%}</td></tr>
			<tr><td style="color: black; font-family: monospace; font-size: 1.2em; font-weight: normal; padding: 5px 10px; text-align: left;">{%Merchant%}: </td><td style="color: black; font-family: monospace; font-size: 1.2em; font-weight: normal;	padding: 5px 10px; text-align: left;"><?php echo $this->merchant;?></td></tr>
			<tr style="border-bottom:2px solid #848484;"><td style="color: black; font-family: monospace; font-size: 1.2em; font-weight: normal; padding: 5px 10px; text-align: left;">{%Invoice Number%}: </td><td style="color: black; font-family: monospace; font-size: 1.2em; font-weight: normal; padding: 5px 10px; text-align: left;"><?php echo $this->invoiceNum;?></td></tr>
			<tr style="border-bottom:2px solid #848484;">
				<td valign="top" colspan="2">
					<table border="0" cellpadding="0" cellspacing="0" width="100%">
						<tr><td valign="top" width="50%">
								<table id="billInfo" border="0" cellpadding="2" cellspacing="1">
									<tr><td style="color: black; font-family: monospace; font-size: 1.2em; font-weight: bold; padding: 15px 5px 5px 10px;">{%Billing Information%}: </td></tr>
									<?php foreach ($this->billingInfo as $label=>$value) { ?>
									<tr><td style="padding: 2px 10px; font-family: monospace; font-size: 1.2em; font-weight: normal; white-space: nowrap;"><?php echo '{%'.$label.'%}: '?></td><td style="padding: 2px 10px; font-family: monospace; font-size: 1.2em; font-weight: normal;"><?php echo $value;?></td></tr>
									<?php }?>
								</table>
							</td>
							<td valign="top" width="50%">
								<table id="shipInfo" border="0" cellpadding="2" cellspacing="1">
									<tr><td style="color: black; font-family: monospace; font-size: 1.2em; font-weight: bold; padding: 15px 5px 5px 10px;">{%Shipping Information%}: </td></tr>
									<?php foreach ($this->shippingInfo as $label=>$value) {?>
									<tr><td style="padding: 2px 10px; font-family: monospace; font-size: 1.2em; font-weight: normal; white-space: nowrap;"><?php echo '{%'.$label.'%}: '; ?></td><td style="padding: 2px 10px; font-family: monospace; font-size: 1.2em; font-weight: normal;"><?php echo $value;?></td></tr>
									<?php }?>
								</table>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr><td style="background: #848484; color: whitesmoke; font-family: monospace; font-size: 1.1em; font-weight: bold; padding: 2px 15px;" colspan="2">{%Products%}</td></tr>
			<tr><td colspan="2"><table style="width: 100%; border-collapse: collapse; text-align: center;" id="productInfo" border="0" cellpadding="2" cellspacing="1">
					<tr>
						<th style="padding: 2px 10px; font-family: monospace; font-size: 1.2em; font-weight: normal; background-color: #f4f4f4; width: 20px; white-space: nowrap;">{%Item Id%}</th>
						<th style="padding: 2px 10px; font-family: monospace; font-size: 1.2em; font-weight: normal; background-color: #f4f4f4;">{%Name%}</th>
						<th style="padding: 2px 10px; font-family: monospace; font-size: 1.2em; font-weight: normal; background-color: #f4f4f4;">{%Description%}</th>
						<th style="padding: 2px 10px; font-family: monospace; font-size: 1.2em; font-weight: normal; background-color: #f4f4f4; width: 30px;">{%Quantity%}</th>
						<th style="padding: 2px 10px; font-family: monospace; font-size: 1.2em; font-weight: normal; background-color: #f4f4f4;">{%Unit Price%}</th>
						<th style="padding: 2px 10px; font-family: monospace; font-size: 1.2em; font-weight: normal; background-color: #f4f4f4;">{%Total%}</th>
					</tr>
					<?php foreach($this->products as $prod) { ?>
					<tr style="border-bottom: 1px solid #848484;">
						<td style="padding: 2px 10px; font-family: monospace; font-size: 1.2em; font-weight: normal;"><?php echo $prod['id'];?></td>
						<td style="padding: 2px 10px; font-family: monospace; font-size: 1.2em; font-weight: normal;"><?php echo $prod['name'];?></td>
						<td style="padding: 2px 10px; font-family: monospace; font-size: 1.2em; font-weight: normal;"><?php foreach($prod['options'] as $opt=>$value){?> <div style="font-size: 1.0em; font-family: monospace; padding: 2px 0;"><?php echo $opt.":".$value; ?></div> <?php }?> </td>
						<td style="padding: 2px 10px; font-family: monospace; font-size: 1.2em; font-weight: normal; width: 20px;"><?php echo $prod['count'];?></td>
						<td style="padding: 2px 10px; font-family: monospace; font-size: 1.2em; font-weight: normal;"><?php echo $prod['price']." ".$this->currency;?></td>
						<td style="padding: 2px 10px; font-family: monospace; font-size: 1.2em; font-weight: normal;"><?php echo number_format(($prod['price']*$prod['count']),2)." ".$this->currency;?></td>
					</tr>
					<?php }?>
				</table>
			</tr>
			<tr><td style="background: #848484; color: whitesmoke; font-family: monospace; font-size: 1.1em; font-weight: bold; padding: 2px 15px;" colspan="2">{%Transaction data%}</td></tr>
			<tr><td style="color: black; font-family: monospace; font-size: 1.2em; font-weight: normal;	padding: 5px 10px; text-align: left;">{%Date%}: <?php echo $this->dateTxn;?></td>
				<td rowspan="4">
					<table style="float: right; border-collapse: collapse;" border="0" cellpadding="0" cellspacing="0">
						<tr><td style="color: black; font-family: monospace; font-size: 1.2em; font-weight: normal; padding: 5px 10px; text-align: left;">{%Subtotal%}: </td><td style="color: black; font-family: monospace; font-size: 1.2em; font-weight: normal; padding: 5px 10px; text-align: right;"><?php echo $this->subtotal." ".$this->currency;?></td></tr>
						<tr><td style="color: black; font-family: monospace; font-size: 1.2em; font-weight: normal; padding: 5px 10px; text-align: left;">{%Tax%}: </td><td style="color: black; font-family: monospace; font-size: 1.2em; font-weight: normal; padding: 5px 10px; text-align: right;"><?php echo $this->tax." ".$this->currency;?></td></tr>
						<tr><td style="color: black; font-family: monospace; font-size: 1.2em; font-weight: normal; padding: 5px 10px; text-align: left;">{%Shipping%}: </td><td style="color: black; font-family: monospace; font-size: 1.2em; font-weight: normal; padding: 5px 10px; text-align: right;"><?php echo $this->shipping." ".$this->currency;?></td></tr>
						<tr><td style="color: black; font-family: monospace; font-size: 1.2em; font-weight: normal; padding: 5px 10px; text-align: left;">{%Total%}: </td><td style="color: black; font-family: monospace; font-size: 1.2em; font-weight: normal; padding: 5px 10px; text-align: right;"><?php echo $this->amount." ".$this->currency;?></td></tr>
					</table>
				</td>
			</tr>
			<tr><td style="color: black; font-family: monospace; font-size: 1.3em; font-weight: normal;	padding: 5px 10px; text-align: left;">{%Transaction ID%}: <?php echo $this->txn;?></td></tr>
			<!--<tr><td style="color: black; font-family: monospace; font-size: 1.3em; font-weight: normal;	padding: 5px 10px; text-align: left;"><?php if($this->toAdmin==true){echo "{%Referrer%}: ".$this->referrer;}else{echo "&nbsp;";}?></td></tr>-->
			<tr><td style="color: black; font-family: monospace; font-size: 1.3em; font-weight: normal;	padding: 5px 10px; text-align: left;"><?php if($this->toAdmin==true){echo "{%Keywords%}: ".$this->keywords;}else{echo "&nbsp;";}?></td></tr>
			<?php if($this->toAdmin==false) { ?>
			<tr><td style="background: #848484; color: whitesmoke; font-family: monospace; font-size: 1.1em; font-weight: bold;	padding: 2px 15px;" colspan="2">{%Return & Shipping Policy%}</td></tr>
			<tr>
				<td colspan="2">
					<table border="0" cellpadding="0" cellspacing="0">
						<tr>
							<td style="padding: 2px 10px; font-family: monospace; font-size: 1.2em; font-weight: normal;">{%Policy Page%}: </td>
							<td style="padding: 2px 10px; font-family: monospace; font-size: 1.2em; font-weight: normal;"><a href="<?php echo $this->policy; ?>"><?php echo $this->policy; ?></a></td>
						</tr>
						<tr>
							<td style="padding: 2px 10px; font-family: monospace; font-size: 1.2em; font-weight: normal;">{%Legal Info%}: </td>
							<td style="padding: 2px 10px; font-family: monospace; font-size: 1.2em; font-weight: normal;"><?php echo $this->legal; ?></td>
						</tr>
					</table>
				</td>
			</tr>
			<?php } ?>
		</tbody>
	</table>
<div style="color: black; font-family: monospace; font-size: 1.3em; font-weight: normal;	padding: 5px 10px; text-align: left;"><?php if($this->toAdmin==true){echo "{%Referrer%}: ".$this->referrer;}else{echo "&nbsp;";}?></div>